package com.jie.server.core.entity;

import lombok.Getter;

import java.nio.channels.SelectionKey;

/**
 * 服务端记录登录客户端的信息的
 * @author XieZhiJie
 * @date 2022/04/25 12:07
 */
@Getter
public class SessionNode {

    /**
     * 客户端ip地址
     */
    private final String ip;

    /**
     * 客户端端口号
     */
    private final int port;

    /**
     * 客户端的key
     */
    private final SelectionKey key;

    public SessionNode(String ip, int port, SelectionKey key) {
        this.ip = ip;
        this.port = port;
        this.key = key;
    }

}
